package com.situ.crm2026.dao;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.situ.crm2026.model.Coach;
import com.situ.crm2026.model.dto.CoachDto;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CoachMapper extends BaseMapper<Coach> {

    default Page<Coach> findAll(Page<Coach> page, Coach csb){
        //定义查询器
        LambdaQueryWrapper<Coach> queryWrapper = new LambdaQueryWrapper<>(csb);
        return this.selectPage(page,queryWrapper);
    }
        //查团课学员
    List<CoachDto>  findByCoachId(Integer id);
        //查私课学员
    List<CoachDto>  findByPrivateId(Integer id);
}
